<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('排程编号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control" name="row[schedule_no]" type="text" value="{$row.schedule_no|default=''}" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('排程名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control" name="row[schedule_name]" type="text" value="{$row.schedule_name|default=''}" required>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('排程类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control selectpicker" name="row[schedule_type]" data-rule="required">
                <option value="1" {if $row.schedule_type == 1}selected{/if}>主排程</option>
                <option value="2" {if $row.schedule_type == 2}selected{/if}>子排程</option>
                <option value="3" {if $row.schedule_type == 3}selected{/if}>紧急排程</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('开始日期')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control" name="row[start_date]" type="date" value="{$row.start_date|default=''}" required>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('结束日期')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control" name="row[end_date]" type="date" value="{$row.end_date|default=''}" required>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('排程算法')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control selectpicker" name="row[algorithm]">
                <option value="priority" {if $row.algorithm == 'priority'}selected{/if}>优先级算法</option>
                <option value="shortest_job" {if $row.algorithm == 'shortest_job'}selected{/if}>最短作业优先</option>
                <option value="earliest_deadline" {if $row.algorithm == 'earliest_deadline'}selected{/if}>最早截止时间</option>
                <option value="critical_path" {if $row.algorithm == 'critical_path'}selected{/if}>关键路径法</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('状态')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control selectpicker" name="row[status]">
                <option value="0" {if $row.status == 0}selected{/if}>草稿</option>
                <option value="1" {if $row.status == 1}selected{/if}>已发布</option>
                <option value="2" {if $row.status == 2}selected{/if}>执行中</option>
                <option value="3" {if $row.status == 3}selected{/if}>已完成</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('备注')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea class="form-control" name="row[remark]" rows="3" placeholder="请输入排程说明">{$row.remark|default=''}</textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
